home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / SHELLS / SZ2 / ADEMO9.DEF < prev    next >
Text File  |  1992-08-31  |  3KB  |  75 lines

  1. .TUTORIAL - The GENERAL, ExecSWAP and ExecPROC units
  2.  
  3. This example shows how to use swap-to-disk.
  4.  
  5.                          ExecSWAP & ExecPROC
  6.  
  7. The EXEC*.DOC files have technical details on usage.  SHAZAM
  8. simplifies use of these units, via the "/x" and "/u" switches.
  9.  
  10.                                  /U+
  11.  
  12. This unitizes the program, encapsulating the generated application.
  13. The INTERFACE section of the unit (*_U.PAS) contains only a "GO"
  14. procedure; the main program (*.PAS) calls this procedure.
  15.  
  16.                                  /X+
  17.  
  18. This option causes the ExecSWAP and ExecPROC units to be added to the
  19. proper USES clause.  To minimize resident overhead when swapping, the
  20. ExecSWAP unit is placed LAST in the USES clause of the main program;
  21. when "unitized", the ExecPROC unit is added to the main unit
  22. (*_U.PAS).
  23.  
  24. For EXEC calls, use the EXEC routine in ExecPROC; to avoid confusion,
  25. use the fully-qualified name:  "ExecProc.EXEC" instead of "DOS.Exec".
  26.  
  27.                              /O+ and /O1+
  28.  
  29. These force the use of overlays and remap the buffer to the top of
  30. the heap.  If remapped, the overlay heap can be recovered for EXEC
  31. calls, when swapping is not possible or desired.  See the init unit
  32. (*_I.PAS) for any generated program.
  33.  
  34.                              GENERAL.PAS
  35.  
  36. The "shell" routines are pre-defined in this unit, and use
  37. "VisionExec", which does the following:
  38.  
  39.     [X] Saves & Restores the Desktop
  40.     [X] Turbo Vision shutdown & restart
  41.     [X] Maximizes the amount of memory for the child process under all
  42.         conditions.
  43.  
  44.  
  45. NOTES
  46. =====
  47. 1.  Try each "DOS Shell" option, check available memory using the
  48.     "MEM" command at the DOS prompt.
  49.  
  50. 2.  This is last of the true blue tutorials, but you'll find more
  51.     feature demonstrations plus many tips and tricks for both SHAZAM
  52.     and Turbo Vision in the other examples.
  53.  
  54. @PA - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  55. [ SWITCH ]
  56. /x+/u+/o+/o1+                @@ ExecSWAP, Unitize, Overlays & Remap ON
  57.  
  58. [ UNIT ]
  59. General
  60.  
  61. [ EXTERNAL ]
  62. Open                                                  @@ re-use old
  63. DOSShell,LittleDOS,MediumDOS,BigDOS                   @@ GENERAL unit
  64.  
  65. [ SUBMENU ] File             ;;file management
  66. open f3                      ;;open a file            @@ *.EVT file
  67. save   f2                    ;;save current window    @@ EDITORS.PAS internal
  68. [ NEWLINE ]
  69.   [ NEWSUB ] 'DOS shell'     ;;access DOS command-line
  70.   'Little DOS' Ctrl-O        ;;instant access with available memory
  71.   'Medium DOS'               ;;quick access, maximum memory without swap
  72.   'Big DOS'    Alt-O         ;;swap to EMS or disk, access with maximum memory
  73.   [ENDSUB]
  74. E~x~it  alt-x  cmQuit        ;;quit program, return to DOS
  75.